package com.ccsc.auth.service;

import com.ccsc.auth.entity.Role;
import com.ccsc.auth.entity.User;
import com.ccsc.auth.utils.DataMap;
import com.ccsc.auth.utils.Page;

import java.util.List;

/**
 * 用户service
 * Created by XingWen on 2016/3/29.
 */
public interface UserService {
    User verifyAccount(DataMap params) throws Exception;					    //登录用户验证

    List<User> getAllUsers() throws Exception;       						    //获取全部用户列表
    List<User> getUserByStatus(Integer status) throws Exception; 				//根据用户状态查用户信息
    List<User> getUserByName(String name) throws Exception; 				//根据用户状态查用户信息
    List<User> getUserByRoleId(Integer roleId) throws Exception; 		        //根据角色查用户列表
    List<User> getUsersByAccount(String account) throws Exception; 					//根据用户账号查用户信息
    List<User> getUserByDepartmentAndPosition(Integer department,Integer position) throws Exception; 		//根据用户部门职位查用户列表

    Page getUsersByPage(DataMap params) throws Exception;					    //分页查询用户列表
    Page getUsersByPage(User user,DataMap params) throws Exception;				//分页查询用户列表

    User getUserById(Integer id) throws Exception;   						    //根据用户ID查用户信息
    User getUserByAccount(String account) throws Exception; 					//根据用户账号查用户信息

    Integer createUser(User user) throws Exception;  						    //添加用户
    Integer updateUser(User user) throws Exception;   		   				    //修改用户
    Integer deleteUserById(Integer id) throws Exception; 					    //删除用户

    Integer activeUser(Integer id) throws Exception;							//激活用户
    Integer withdrawUser(Integer id) throws Exception;						    //注销用户
    Integer batchActiveUser(List<Integer> ids) throws Exception;				//批量激活用户
    Integer batchWithdrawUser(List<Integer> ids) throws Exception;				//批量注销用户
}
